package com.cebbank.yyi.springbootapp.jingtang.service.impl;

import cn.hutool.core.util.StrUtil;
import com.cebbank.yyi.springbootapp.jingtang.dto.ConditionParams;
import com.cebbank.yyi.springbootapp.jingtang.dto.DbMigrationParams;
import com.cebbank.yyi.springbootapp.jingtang.dto.FileOperatorParams;
import com.cebbank.yyi.springbootapp.jingtang.json.MenuBO;
import com.cebbank.yyi.springbootapp.jingtang.service.SystemMigrationService;
import com.cebbank.yyi.springbootapp.jingtang.test.*;
import com.cebbank.yyi.springbootapp.jingtang.utils.RequestUtil;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

@Slf4j
@Service
public class SystemMigrationServiceImpl implements SystemMigrationService {

    //    private final static String LOCAL_PATH = "C:\\project\\test\\";

    @Autowired
    private ApplyMappingService applyMappingService;

    @Autowired
    private ApplyMappingService2 applyMappingService2;


    @Override
    public void dbMigration(DbMigrationParams dbMigrationParams) throws Exception {
//        String fileType = "[\n" + "    {\n" + "        \"name\": \"质量抱怨报告\",\n" + "        \"menuType\": 928,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"工艺变更申请表\",\n" + "        \"menuType\": 263,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"循环经济中心\",\n" + "        \"menuType\": 146,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"运输部\",\n" + "        \"menuType\": 145,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"能源与环境部\",\n" + "        \"menuType\": 971,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"销售管理部\",\n" + "        \"menuType\": 144,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"质检监督部\",\n" + "        \"menuType\": 143,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 142,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 141,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板事业部\",\n" + "        \"menuType\": 140,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 139,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 138,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 137,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"焦化作业部\",\n" + "        \"menuType\": null,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"供料作业部\",\n" + "        \"menuType\": null,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼铁作业部\",\n" + "        \"menuType\": 136,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"制造部\",\n" + "        \"menuType\": 134,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"技术通知单\",\n" + "        \"menuType\": 56,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"运输部\",\n" + "        \"menuType\": 159,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"销售管理部\",\n" + "        \"menuType\": 158,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"质检监督部\",\n" + "        \"menuType\": 157,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 156,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 155,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板事业部\",\n" + "        \"menuType\": 154,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 153,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 152,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼铁作业部\",\n" + "        \"menuType\": 150,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"焦化作业部\",\n" + "        \"menuType\": 149,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 151,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡产品\",\n" + "        \"menuType\": 148,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"制造部\",\n" + "        \"menuType\": 147,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"试生产方案\",\n" + "        \"menuType\": 58,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"循环经济中心\",\n" + "        \"menuType\": 123,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"数智运营部\",\n" + "        \"menuType\": 122,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"运输部\",\n" + "        \"menuType\": 121,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"销售管理部\",\n" + "        \"menuType\": 120,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"能源与环境部\",\n" + "        \"menuType\": 119,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"质检监督部\",\n" + "        \"menuType\": 118,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 117,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 116,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板事业部\",\n" + "        \"menuType\": 115,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 114,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 113,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 112,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼铁作业部\",\n" + "        \"menuType\": 111,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"焦化作业部\",\n" + "        \"menuType\": 110,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"供料作业部\",\n" + "        \"menuType\": 109,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"岗位规程\",\n" + "        \"menuType\": 52,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"技术标准\",\n" + "        \"menuType\": 49,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"运输部\",\n" + "        \"menuType\": 133,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"销售管理部\",\n" + "        \"menuType\": 132,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 131,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 130,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板作业部\",\n" + "        \"menuType\": 129,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 128,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 127,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 126,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼铁作业部\",\n" + "        \"menuType\": 125,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"控制计划\",\n" + "        \"menuType\": 54,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"PFMEA工作规范\",\n" + "        \"menuType\": 168,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"运输部\",\n" + "        \"menuType\": 352,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"销售管理部\",\n" + "        \"menuType\": 351,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 350,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 349,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板事业部\",\n" + "        \"menuType\": 348,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 347,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 346,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 345,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼铁作业部\",\n" + "        \"menuType\": 344,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"PFMEA\",\n" + "        \"menuType\": 343,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"复合板\",\n" + "        \"menuType\": 167,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板\",\n" + "        \"menuType\": 166,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧板\",\n" + "        \"menuType\": 165,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"酸洗板\",\n" + "        \"menuType\": 163,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"涂镀板\",\n" + "        \"menuType\": 164,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"家电专用板\",\n" + "        \"menuType\": null,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡镀铬板\",\n" + "        \"menuType\": 162,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"汽车板\",\n" + "        \"menuType\": 161,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"DFMEA\",\n" + "        \"menuType\": 55,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 108,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 107,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板事业部\",\n" + "        \"menuType\": 106,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 105,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 104,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 103,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼铁作业部\",\n" + "        \"menuType\": 102,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"焦化作业部\",\n" + "        \"menuType\": 101,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"技术规程\",\n" + "        \"menuType\": 51,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"产品工艺规程\",\n" + "        \"menuType\": 50,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"认证规范\",\n" + "        \"menuType\": 919,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"检验方法\",\n" + "        \"menuType\": 918,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"产品交货标准\",\n" + "        \"menuType\": 917,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"外部标准\",\n" + "        \"menuType\": 48,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"生产技术文件\",\n" + "        \"menuType\": null,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"首钢凯西\",\n" + "        \"menuType\": null,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"秦机公司\",\n" + "        \"menuType\": null,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"首宝核力\",\n" + "        \"menuType\": null,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"团委\",\n" + "        \"menuType\": 46,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"纪委\",\n" + "        \"menuType\": 45,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"工会\",\n" + "        \"menuType\": 44,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"宣传部\",\n" + "        \"menuType\": 47,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"党委组织部\",\n" + "        \"menuType\": 43,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"人力资源部\",\n" + "        \"menuType\": 42,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"办公室\",\n" + "        \"menuType\": 41,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"审计部\",\n" + "        \"menuType\": 40,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"运营规划部\",\n" + "        \"menuType\": 39,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"计财部\",\n" + "        \"menuType\": 38,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"工程部\",\n" + "        \"menuType\": 37,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"保卫部\",\n" + "        \"menuType\": 36,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"数智运营部\",\n" + "        \"menuType\": 35,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"安全管理部\",\n" + "        \"menuType\": 34,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"设备部\",\n" + "        \"menuType\": 33,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"技术中心\",\n" + "        \"menuType\": 32,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"制造部\",\n" + "        \"menuType\": 31,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"销售管理部\",\n" + "        \"menuType\": 30,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"循环经济中心\",\n" + "        \"menuType\": 29,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"质检监督部\",\n" + "        \"menuType\": 28,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"运输部\",\n" + "        \"menuType\": 27,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"能源与环境部\",\n" + "        \"menuType\": 26,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡部食品安全\",\n" + "        \"menuType\": 410,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡部规章制度\",\n" + "        \"menuType\": 408,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 25,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 24,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板事业部\",\n" + "        \"menuType\": 23,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 22,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 21,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 20,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼铁作业部\",\n" + "        \"menuType\": 19,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"焦化作业部\",\n" + "        \"menuType\": 18,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"供料作业部\",\n" + "        \"menuType\": 17,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"部门级规章制度\",\n" + "        \"menuType\": 4,\n" + "        \"type\": \"部门级规章制度\"\n" + "    }\n" +  "]";
//        String fileType = "[\n" + "    {\n" + "        \"name\": \"管理手册\",\n" + "        \"menuType\": 2,\n" + "        \"type\": \"管理手册\"\n" + "    },\n" + "    {\n" + "        \"name\": \"公司级规章制度\",\n" + "        \"menuType\": 3,\n" + "        \"type\": \"公司级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"部门级规章制度\",\n" + "        \"menuType\": 4,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"供料作业部\",\n" + "        \"menuType\": 17,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"焦化作业部\",\n" + "        \"menuType\": 18,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼铁作业部\",\n" + "        \"menuType\": 19,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 20,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 21,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 22,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板事业部\",\n" + "        \"menuType\": 23,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 24,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 25,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡部规章制度\",\n" + "        \"menuType\": 408,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡部食品安全\",\n" + "        \"menuType\": 410,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"能源与环境部\",\n" + "        \"menuType\": 26,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"运输部\",\n" + "        \"menuType\": 27,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"质检监督部\",\n" + "        \"menuType\": 28,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"循环经济中心\",\n" + "        \"menuType\": 29,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"销售管理部\",\n" + "        \"menuType\": 30,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"制造部\",\n" + "        \"menuType\": 31,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"技术中心\",\n" + "        \"menuType\": 32,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"设备部\",\n" + "        \"menuType\": 33,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"安全管理部\",\n" + "        \"menuType\": 34,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"数智运营部\",\n" + "        \"menuType\": 35,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"保卫部\",\n" + "        \"menuType\": 36,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"工程部\",\n" + "        \"menuType\": 37,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"计财部\",\n" + "        \"menuType\": 38,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"运营规划部\",\n" + "        \"menuType\": 39,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"审计部\",\n" + "        \"menuType\": 40,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"办公室\",\n" + "        \"menuType\": 41,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"人力资源部\",\n" + "        \"menuType\": 42,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"党委组织部\",\n" + "        \"menuType\": 43,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"宣传部\",\n" + "        \"menuType\": 47,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"工会\",\n" + "        \"menuType\": 44,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"纪委\",\n" + "        \"menuType\": 45,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"团委\",\n" + "        \"menuType\": 46,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"首宝核力\",\n" + "        \"menuType\": null,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"秦机公司\",\n" + "        \"menuType\": null,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"首钢凯西\",\n" + "        \"menuType\": null,\n" + "        \"type\": \"部门级规章制度\"\n" + "    },\n" + "    {\n" + "        \"name\": \"生产技术文件\",\n" + "        \"menuType\": null,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"外部标准\",\n" + "        \"menuType\": 48,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"产品交货标准\",\n" + "        \"menuType\": 917,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"检验方法\",\n" + "        \"menuType\": 918,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"认证规范\",\n" + "        \"menuType\": 919,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"产品工艺规程\",\n" + "        \"menuType\": 50,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"技术规程\",\n" + "        \"menuType\": 51,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"焦化作业部\",\n" + "        \"menuType\": 101,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼铁作业部\",\n" + "        \"menuType\": 102,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 103,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 104,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 105,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板事业部\",\n" + "        \"menuType\": 106,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 107,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 108,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"DFMEA\",\n" + "        \"menuType\": 55,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"汽车板\",\n" + "        \"menuType\": 161,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡镀铬板\",\n" + "        \"menuType\": 162,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"家电专用板\",\n" + "        \"menuType\": null,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"涂镀板\",\n" + "        \"menuType\": 164,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"酸洗板\",\n" + "        \"menuType\": 163,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧板\",\n" + "        \"menuType\": 165,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板\",\n" + "        \"menuType\": 166,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"复合板\",\n" + "        \"menuType\": 167,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"PFMEA\",\n" + "        \"menuType\": 343,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼铁作业部\",\n" + "        \"menuType\": 344,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 345,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 346,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 347,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板事业部\",\n" + "        \"menuType\": 348,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 349,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 350,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"销售管理部\",\n" + "        \"menuType\": 351,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"运输部\",\n" + "        \"menuType\": 352,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"PFMEA工作规范\",\n" + "        \"menuType\": 168,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"控制计划\",\n" + "        \"menuType\": 54,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼铁作业部\",\n" + "        \"menuType\": 125,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 126,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 127,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 128,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板作业部\",\n" + "        \"menuType\": 129,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 130,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 131,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"销售管理部\",\n" + "        \"menuType\": 132,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"运输部\",\n" + "        \"menuType\": 133,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"技术标准\",\n" + "        \"menuType\": 49,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"岗位规程\",\n" + "        \"menuType\": 52,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"供料作业部\",\n" + "        \"menuType\": 109,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"焦化作业部\",\n" + "        \"menuType\": 110,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼铁作业部\",\n" + "        \"menuType\": 111,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 112,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 113,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 114,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板事业部\",\n" + "        \"menuType\": 115,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 116,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 117,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"质检监督部\",\n" + "        \"menuType\": 118,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"能源与环境部\",\n" + "        \"menuType\": 119,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"销售管理部\",\n" + "        \"menuType\": 120,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"运输部\",\n" + "        \"menuType\": 121,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"数智运营部\",\n" + "        \"menuType\": 122,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"循环经济中心\",\n" + "        \"menuType\": 123,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"试生产方案\",\n" + "        \"menuType\": 58,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"制造部\",\n" + "        \"menuType\": 147,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡产品\",\n" + "        \"menuType\": 148,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 151,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"焦化作业部\",\n" + "        \"menuType\": 149,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼铁作业部\",\n" + "        \"menuType\": 150,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 152,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 153,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板事业部\",\n" + "        \"menuType\": 154,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 155,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 156,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"质检监督部\",\n" + "        \"menuType\": 157,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"销售管理部\",\n" + "        \"menuType\": 158,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"运输部\",\n" + "        \"menuType\": 159,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"技术通知单\",\n" + "        \"menuType\": 56,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"制造部\",\n" + "        \"menuType\": 134,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼铁作业部\",\n" + "        \"menuType\": 136,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"供料作业部\",\n" + "        \"menuType\": null,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"焦化作业部\",\n" + "        \"menuType\": null,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 137,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 138,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 139,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板事业部\",\n" + "        \"menuType\": 140,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 141,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 142,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"质检监督部\",\n" + "        \"menuType\": 143,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"销售管理部\",\n" + "        \"menuType\": 144,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"能源与环境部\",\n" + "        \"menuType\": 971,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"运输部\",\n" + "        \"menuType\": 145,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"循环经济中心\",\n" + "        \"menuType\": 146,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"工艺变更申请表\",\n" + "        \"menuType\": 263,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"质量抱怨报告\",\n" + "        \"menuType\": 928,\n" + "        \"type\": \"生产技术文件\"\n" + "    }\n" + "]";
        String fileType = "[\n" + "    {\n" + "        \"name\": \"生产技术文件\",\n" + "        \"menuType\": null,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"外部标准\",\n" + "        \"menuType\": 48,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"产品交货标准\",\n" + "        \"menuType\": 917,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"检验方法\",\n" + "        \"menuType\": 918,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"认证规范\",\n" + "        \"menuType\": 919,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"产品工艺规程\",\n" + "        \"menuType\": 50,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"技术规程\",\n" + "        \"menuType\": 51,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"焦化作业部\",\n" + "        \"menuType\": 101,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼铁作业部\",\n" + "        \"menuType\": 102,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 103,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 104,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 105,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板事业部\",\n" + "        \"menuType\": 106,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 107,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 108,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"DFMEA\",\n" + "        \"menuType\": 55,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"汽车板\",\n" + "        \"menuType\": 161,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡镀铬板\",\n" + "        \"menuType\": 162,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"家电专用板\",\n" + "        \"menuType\": null,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"涂镀板\",\n" + "        \"menuType\": 164,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"酸洗板\",\n" + "        \"menuType\": 163,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧板\",\n" + "        \"menuType\": 165,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板\",\n" + "        \"menuType\": 166,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"复合板\",\n" + "        \"menuType\": 167,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"PFMEA\",\n" + "        \"menuType\": 343,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼铁作业部\",\n" + "        \"menuType\": 344,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 345,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 346,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 347,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板事业部\",\n" + "        \"menuType\": 348,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 349,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 350,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"销售管理部\",\n" + "        \"menuType\": 351,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"运输部\",\n" + "        \"menuType\": 352,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"PFMEA工作规范\",\n" + "        \"menuType\": 168,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"控制计划\",\n" + "        \"menuType\": 54,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼铁作业部\",\n" + "        \"menuType\": 125,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 126,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 127,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 128,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板作业部\",\n" + "        \"menuType\": 129,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 130,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 131,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"销售管理部\",\n" + "        \"menuType\": 132,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"运输部\",\n" + "        \"menuType\": 133,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"技术标准\",\n" + "        \"menuType\": 49,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"岗位规程\",\n" + "        \"menuType\": 52,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"供料作业部\",\n" + "        \"menuType\": 109,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"焦化作业部\",\n" + "        \"menuType\": 110,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼铁作业部\",\n" + "        \"menuType\": 111,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 112,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 113,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 114,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板事业部\",\n" + "        \"menuType\": 115,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 116,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 117,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"质检监督部\",\n" + "        \"menuType\": 118,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"能源与环境部\",\n" + "        \"menuType\": 119,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"销售管理部\",\n" + "        \"menuType\": 120,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"运输部\",\n" + "        \"menuType\": 121,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"数智运营部\",\n" + "        \"menuType\": 122,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"循环经济中心\",\n" + "        \"menuType\": 123,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"试生产方案\",\n" + "        \"menuType\": 58,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"制造部\",\n" + "        \"menuType\": 147,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡产品\",\n" + "        \"menuType\": 148,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 151,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"焦化作业部\",\n" + "        \"menuType\": 149,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼铁作业部\",\n" + "        \"menuType\": 150,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 152,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 153,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板事业部\",\n" + "        \"menuType\": 154,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 155,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 156,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"质检监督部\",\n" + "        \"menuType\": 157,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"销售管理部\",\n" + "        \"menuType\": 158,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"运输部\",\n" + "        \"menuType\": 159,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"技术通知单\",\n" + "        \"menuType\": 56,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"制造部\",\n" + "        \"menuType\": 134,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼铁作业部\",\n" + "        \"menuType\": 136,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"供料作业部\",\n" + "        \"menuType\": null,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"焦化作业部\",\n" + "        \"menuType\": null,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 137,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 138,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 139,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板事业部\",\n" + "        \"menuType\": 140,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 141,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 142,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"质检监督部\",\n" + "        \"menuType\": 143,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"销售管理部\",\n" + "        \"menuType\": 144,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"能源与环境部\",\n" + "        \"menuType\": 971,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"运输部\",\n" + "        \"menuType\": 145,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"循环经济中心\",\n" + "        \"menuType\": 146,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"工艺变更申请表\",\n" + "        \"menuType\": 263,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"质量抱怨报告\",\n" + "        \"menuType\": 928,\n" + "        \"type\": \"生产技术文件\"\n" + "    }\n" + "]";
//        String fileType = "[\n" + "    {\n" + "        \"name\": \"PFMEA\",\n" + "        \"menuType\": 343,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼铁作业部\",\n" + "        \"menuType\": 344,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 345,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 346,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 347,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"中厚板事业部\",\n" + "        \"menuType\": 348,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 349,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 350,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"销售管理部\",\n" + "        \"menuType\": 351,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"运输部\",\n" + "        \"menuType\": 352,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"PFMEA工作规范\",\n" + "        \"menuType\": 168,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"质量抱怨报告\",\n" + "        \"menuType\": 928,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"工艺变更申请表\",\n" + "        \"menuType\": 263,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"炼钢作业部\",\n" + "        \"menuType\": 978,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"钢轧作业部\",\n" + "        \"menuType\": 979,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"热轧作业部\",\n" + "        \"menuType\": 980,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"冷轧作业部\",\n" + "        \"menuType\": 982,\n" + "        \"type\": \"生产技术文件\"\n" + "    },\n" + "    {\n" + "        \"name\": \"镀锡板事业部\",\n" + "        \"menuType\": 983,\n" + "        \"type\": \"生产技术文件\"\n" + "    }\n" + "]";
        Gson gson = new Gson();
        Type type = new TypeToken<List<DocFileType>>() {
        }.getType();
        List<DocFileType> docFileTypes = gson.fromJson(fileType, type);
        // 如果是类型入参放开：
//        List<DocFileType> docFileTypes = dbMigrationParams.getDocFileTypes();
        List<String> statusType = Arrays.asList("3", "5");
        String inputStatus = dbMigrationParams.getStatus();
        Integer inputMenuType = dbMigrationParams.getMenuType();
        Integer inputPageNum = dbMigrationParams.getPageNum();
        boolean isSpecialMigration = StrUtil.isNotEmpty(inputStatus) && null != inputMenuType && null != inputPageNum;
        boolean conFlag = dbMigrationParams.getConFlag();
        boolean isSkip_1 = true;
        boolean isSikp_2 = true;
        boolean isSkip_3 = true;
        for (DocFileType docFileType : docFileTypes) {
            if (docFileType.getMenuType() == null) {
                continue;
            }
            if (isSpecialMigration && !conFlag) {
                if (!docFileType.getMenuType().equals(inputMenuType)) {
                    continue;
                }
            }
            if (isSpecialMigration && conFlag) {
                if (docFileType.getMenuType().equals(inputMenuType)) {
                    isSkip_1 = false;
                }
                if (isSkip_1) {
                    continue;
                }

            }

            // 遍历运行中和已废弃
            for (String status : statusType) {
                if (isSpecialMigration && !conFlag) {
                    if (!status.equals(inputStatus)) {
                        continue;
                    }
                }
                if (isSpecialMigration && conFlag) {
                    if (status.equals(inputStatus)) {
                        isSikp_2 = false;
                    }
                    if (isSikp_2) {
                        continue;
                    }
                }
                dbMigrationParams.setStatus(status);
                // 存放当前类型已同步成功的rdDocId
                List<String> successProcessList = new ArrayList<>();
                // 接口需要上送的参数，比如分页参数
                if (docFileType.getMenuType() == null) {
                    continue;
                }
                System.out.printf("开始同步类型为[%s]，状态为[%s]的文件\n", docFileType.getMenuType(), status);
                ConditionParams conditionParams = new ConditionParams();
                MenuBO menuBO = new MenuBO();
                menuBO.setMenuType(docFileType.getMenuType().toString());
                menuBO.setType(docFileType.getType());
                menuBO.setName(docFileType.getName());
                conditionParams.setPageSize(1);
                //该位置要改动
                int pageNo = 0;
//                if (docFileType.getMenuType() == 3 && Objects.equals(status, "3")) {
//                    continue;
//                }
//                if (docFileType.getMenuType() == 3 && Objects.equals(status, "3")) {
//                    pageNo = 111;
//                }

                boolean isStop = false;
                while (!isStop) {
                    pageNo += 1;
                    if (isSpecialMigration && !conFlag) {
                        if (pageNo != inputPageNum) {
                            continue;
                        } else {
                            isStop = true;
                        }
                    }

                    if (isSpecialMigration && conFlag) {
                        if (pageNo == inputPageNum) {
                            isSkip_3 = false;
                        }
                        if (isSkip_3) {
                            continue;
                        }
                    }
                    conditionParams.setPageNo(pageNo);
                    String json = RequestUtil.toRequest(dbMigrationParams, menuBO, conditionParams);
                    int retryTime = 0;
                    while (json.equals("捕获到异常,请求失败") || json.equals("请求失败")) {
                        if (retryTime >= 5) {
                            break;
                        }
                        retryTime += 1;
                        log.error("请求老系统文档接口失败：{}-{}，开始第{}次重试", menuBO, conditionParams, retryTime);
                        json = RequestUtil.toRequest(dbMigrationParams, menuBO, conditionParams);

                    }
                    if (retryTime >= 5) {
                        log.error("请求老系统文档接口失败：{}-{}，重试{}次失败，跳过", menuBO, conditionParams, retryTime);
                        continue;
                    }
                    System.err.println("当前请求的数据响应为:" + json);
                    ResultDto resultDto = applyMappingService.applyMapping(json, dbMigrationParams.getToken(), menuBO, conditionParams);
                    if (null == resultDto) {
                        continue;
                    }
                    ResponseDTO responseDTO = resultDto.getResponseDTO();
                    String rocId = resultDto.getRocId();
//                    boolean syncFailed = resultDto.isSyncFailed();
//                    if (syncFailed) {
//                        log.error("当前类型文件同步失败，menuBO：{}，开始回滚已同步文件，并跳过本类型同步！", docFileType);
//                        successProcessList.forEach(it -> applyMappingService.processSyncFailedRecord(it));
//                        break;
//                    }
                    successProcessList.add(rocId);
                    if (responseDTO != null && responseDTO.getData().getPage().getRecords().isEmpty()) {
                        isStop = true;
                    }
                    assert responseDTO != null;
//                    if (responseDTO.getData().getPage().getCurrent().equals(20)) {
//                        System.err.println("当前类型迁移20条数据结束");
//                        isStop = true;
//                    }
                    Thread.sleep(100);
                }
                log.info("当前类型{}已经同步完成", docFileType);
//            break;
            }
        }
        System.out.println("所有数据已经同步完成");
        // okhttp调用接口，这里之后需要改成for循环去获取所有页数
        // 处理结果数据
//        dbDataProcessService.handle(responseDTO);
    }

    @Override
    public void uploadMainFile(FileOperatorParams fileOperatorParams) {
//        FileUtil.uploadMainFile(fileOperatorParams);
    }


    @Override
    public void dbMigrationForRecord(DbMigrationParams dbMigrationParams) throws Exception {
        List<String> statusType = Arrays.asList("3", "5");
        for (String status : statusType) {
            ConditionParams conditionParams = new ConditionParams();
            conditionParams.setPageSize(1);
            dbMigrationParams.setStatus(status);
            int pageNo = 0;
            boolean isStop = false;
            while (!isStop) {
                pageNo += 1;
//                if (pageNo < 1160) {
//                    continue;
//                }
                conditionParams.setPageNo(pageNo);
                String json = RequestUtil.toRequestForRecord(dbMigrationParams, conditionParams);
                ResponseDTO2 responseDTO2 = applyMappingService2.applyMapping(json, dbMigrationParams.getToken(), conditionParams);
                if (responseDTO2 != null && responseDTO2.getData().getPage().getRecords().isEmpty()) {
                    isStop = true;
                }
            }
        }
        System.out.println("所有数据已经同步完成");
    }

}
